
.PHONY:clean
cc=gcc
RM=rm
exe=result
src=$(wildcard *.c)
obj=$(patsubst %.c,%.o,$(src))
myArgs=-Wall -g
 
#ALL:$exe

$(exe):$(obj)
	$(cc) -o $@ $^ $(myArgs)
%.o:%.c
	$(cc) -o $@ -c $< $(myArgs)

clean:
	$(RM) $(exe) $(obj)
